﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace scom_a3_web.james_svc
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        protected void b_test_Click(object sender, EventArgs e)
        {
            string[] urls = tb_urls.Text.Split(',');
            for (int i = 0; i < urls.Length; i++)
            {
                urls[i] = urls[i].Trim();
            }
            DocumentKeywordFinder3.DocumentKeywordFinder_JamesClient dkfjc = new DocumentKeywordFinder3.DocumentKeywordFinder_JamesClient();
            scomA3proj.DocumentResult[] res = dkfjc.FindKeywords(urls, 15);
            l_output.Text = "Output: <br/>";
            foreach (scomA3proj.DocumentResult dr in res)
            {
                l_output.Text += dr.Url + "<br/>";
                foreach (string s in dr.Keywords)
                {
                    l_output.Text += "&nbsp&nbsp&nbsp&nbsp" + s + "<br/>";
                }
                l_output.Text += "<br/><br/>";

            }

        }
    }
}